#pragma once
//#ifndef		//potential replacement for pragma once
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include <math.h>
#include <vector>
#include <stdio.h>
#include <iostream>
#include <map>

using namespace std;

class LineDatabase{
public:
	LineDatabase();
	void set_lines_for_frame(vector<Line> lines);
	void set_lines_for_frame(int frame_id, vector<Line> lines);
	vector<Line> get_lines_from_frame(int frame_id);
	vector<Line> get_lines_from_frame(int frame_id, vector<int> line_indexs);
	
	map<int, map<int,Line>> _AllLines;
	map<int, Line> _AFrame;
	int nextId;

private:

};

LineDatabase::LineDatabase(){
	nextId = 0;
}

void LineDatabase::set_lines_for_frame(vector<Line> lines){
//	_AllLines._Insert(lines);
	for(int i = 0; i < lines.size(); i++){
		_AllLines[nextId][i] = lines[i];
	}
	nextId++;
}

void LineDatabase::set_lines_for_frame(int frame_id, vector<Line> lines){
//	_AFrame[i]
	for(int i = 0; i < lines.size(); i++){
		_AllLines[frame_id][i] = lines[i];
	}
//	nextId++;
}
